<template>
  <a-drawer
    width="45%"
    :title="formTitle"
    :label-col="4"
    :wrapper-col="14"
    :visible="open"
    :body-style="{ height: 'calc(100vh - 100px)', overflow: 'auto' }"
    @close="cancel"
  >
    <a-form-model ref="form" :model="form" :rules="rules" layout="vertical">
      <a-spin :spinning="spinning" :delay="delayTime" tip="Loading...">
        <a-row :gutter="32">
          <a-col :span="12">
            <a-form-model-item label="所在城市" prop="cityName">
              <a-input v-model="form.cityName" placeholder="请输入所在城市" />
            </a-form-model-item>
          </a-col>
          <a-col :span="12">
            <a-form-model-item label="客户名称" prop="cusName">
              <a-input v-model="form.cusName" placeholder="请输入客户名称" />
            </a-form-model-item>
          </a-col>
          <a-col :span="12">
            <a-form-model-item label="电话" prop="phone">
              <a-input v-model="form.phone" placeholder="请输入电话" />
            </a-form-model-item>
          </a-col>
          <a-col :span="12">
            <a-form-model-item label="申请金额" prop="amount">
              <a-input v-model="form.amount" placeholder="请输入申请金额" />
            </a-form-model-item>
          </a-col>
          <a-col :span="12">
            <a-form-model-item label="申请类型" prop="amount">
              <a-select
                placeholder="选择申请类型"
                v-model="form.type"
                style="width: 100%"
                allow-clear
              >
                <a-select-option
                  v-for="(d, index) in typeOptions"
                  :key="index"
                  :value="d.dictValue"
                  >{{ d.dictLabel }}</a-select-option
                >
              </a-select>
            </a-form-model-item>
          </a-col>
          <a-col :span="12">
            <a-form-model-item label="分配状态" prop="amount">
              <a-select
                placeholder="选择分配状态"
                v-model="form.status"
                style="width: 100%"
                allow-clear
              >
                <a-select-option
                  v-for="(d, index) in statusOptions"
                  :key="index"
                  :value="d.dictValue"
                  >{{ d.dictLabel }}</a-select-option
                >
              </a-select>
            </a-form-model-item>
          </a-col>

          <a-col :span="24">
            <a-form-model-item label="备注信息" prop="remark">
              <a-textarea v-model="form.remark" :rows="5"></a-textarea>
            </a-form-model-item>
          </a-col>
        </a-row>
      </a-spin>
      <div class="bottom-control">
        <a-space>
          <a-button @click="cancel"> 取消 </a-button>
          <a-button type="primary" @click="submitForm"> 保存 </a-button>
        </a-space>
      </div>
    </a-form-model>
  </a-drawer>
</template>
<script>
import BizCustomerEditForm from "./BizCustomerForm";
export default {
  ...BizCustomerEditForm,
};
</script>
